package com.pan.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

//@Service
@Slf4j
public class AnimalService extends BiologyService{

    @Autowired
    private CatService catService;

    @Autowired
    private ApplicationContext applicationContext;

    public AnimalService(){

    }

    public void dosomething(){
        catService.eat();
    }

    public AnimalService eatSomething(String name){
        System.out.println("eatsomething-->"+name);
        return this;
    }

    public AnimalService drinkSomething(String name){
        System.out.println("drinksomething-->"+name);
        return this;
    }

    public void eatAndDrink(String name){
        this.eatSomething(name).drinkSomething(name);
    }


}
